From 765d7d0517c692a80cca23ec92fe43ad02511956 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 23 Jun 2004 00:28:47 +0000 Subject: [PATCH] Use a Save or an Open stock button for the C-l dialog depending on the 2004-06-22 Federico Mena Quintero * gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save or an Open stock button for the C-l dialog depending on the action in which the file chooser operates. Fixes #141753. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkfilechooserdefault.c | 7 +++++-- 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1350232edf..c015b35083 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-06-22 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save + or an Open stock button for the C-l dialog depending on the action + in which the file chooser operates. Fixes #141753. + 2004-06-22 Federico Mena Quintero Fixes the GTK+ part of #142308: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1350232edf..c015b35083 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-06-22 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save + or an Open stock button for the C-l dialog depending on the action + in which the file chooser operates. Fixes #141753. + 2004-06-22 Federico Mena Quintero Fixes the GTK+ part of #142308: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1350232edf..c015b35083 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-06-22 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save + or an Open stock button for the C-l dialog depending on the action + in which the file chooser operates. Fixes #141753. + 2004-06-22 Federico Mena Quintero Fixes the GTK+ part of #142308: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1350232edf..c015b35083 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-06-22 Federico Mena Quintero + + * gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save + or an Open stock button for the C-l dialog depending on the action + in which the file chooser operates. Fixes #141753. + 2004-06-22 Federico Mena Quintero Fixes the GTK+ part of #142308: diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 4c4b685a9e..19708c7d1d 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -5328,7 +5328,8 @@ location_popup_handler (GtkFileChooserDefault *impl) GtkWidget *label; GtkWidget *entry; gboolean refocus; - char *title; + const char *title; + const char *accept_stock; /* Create dialog */ @@ -5338,19 +5339,21 @@ location_popup_handler (GtkFileChooserDefault *impl) || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) { title = _("Open Location"); + accept_stock = GTK_STOCK_OPEN; } else { g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER); title = _("Save in Location"); + accept_stock = GTK_STOCK_SAVE; } dialog = gtk_dialog_new_with_buttons (title, toplevel, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + accept_stock, GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); -- 2.30.2